package com.hsy.raffle.controller;




import com.hsy.raffle.service.RaffleService;
import com.hsy.raffle.vo.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


/**
 * 抽奖表(Raffle)表控制层
 *
 * @author makejava
 * @since 2023-05-08 16:00:20
 */
@RestController
@CrossOrigin
@Api(tags = "抽奖模块")
public class RaffleController  {
    /**
     * 服务对象
     */
    @Resource
    private RaffleService service;

    @GetMapping("/api/raffle/all")
    public R all(){
        return service.queryAll();
    }
    @GetMapping("/api/raffle/save")
    public R save(String token){
        return service.save(token);
    }

    @GetMapping("/api/raffle/my")
    public R my(String token){
        return service.queryByUid(token);
    }
    @GetMapping("/api/raffle/check")
    public R check(String token){
        return service.check(token);
    }


}

